package top.vains.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author vains
 * @since 2020-02-17
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel("用户实体，用来存储用户的信息，包括微信注册的用户信息")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "user_id", type = IdType.AUTO)
    @ApiModelProperty(value = "自增ID", dataType = "Integer", example = "0")
    private Integer userId;

    /**
     * 用户名称
     */
    @ApiModelProperty(value = "用户名称", dataType = "String", example = "name")
    private String name;

    /**
     * 手机号
     */
    @ApiModelProperty(value = "手机号", dataType = "String", example = "151********")
    private String phone;

    /**
     * 地址
     */
    @ApiModelProperty(value = "地址", dataType = "String", example = "x省x市")
    private String address;

    /**
     * 是否启用
     */
    @ApiModelProperty(value = "是否启用", dataType = "Boolean", example = "false")
    private Boolean enabled;

    /**
     * 账号
     */
    @ApiModelProperty(value = "账号", dataType = "String", example = "123")
    private String number;

    /**
     * 密码
     */
    @ApiModelProperty(value = "密码", dataType = "String", example = "x")
    private String password;

    /**
     * 描述
     */
    @ApiModelProperty(value = "描述", dataType = "String", example = "描述")
    private String remark;

    /**
     * 微信登陆获取的信息(openId)
     */
    @ApiModelProperty(value = "微信登陆获取的信息(openId)", dataType = "String", example = "openId")
    private String openid;

    /**
     * 值为1时是男性，值为2时是女性，值为0时是未设置
     */
    @ApiModelProperty(value = "值为1时是男性，值为2时是女性，值为0时是未设置", dataType = "Integer", example = "0")
    private Integer sex;

    /**
     * 省份
     */
    @ApiModelProperty(value = "省份", dataType = "String", example = "province")
    private String province;

    /**
     * 城市
     */
    @ApiModelProperty(value = "城市", dataType = "String", example = "city")
    private String city;

    /**
     * 头像
     */
    @ApiModelProperty(value = "头像", dataType = "String", example = "http://test/test.jpg")
    private String headimgurl;


}
